home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1998 May / PCPlus May 1998=disk A.iso / full / CBUILDER / SAMS / SAMPLES / CHAP02 / FORLOOP.CPP next >
Encoding:
C/C++ Source or Header  |  1997-02-12  |  351 b   |  20 lines

  1. #include <iostream.h>
  2. #include <conio.h>
  3. #pragma hdrstop
  4.  
  5. int main(int argv, char** argc)
  6. {
  7.   cout << endl << "Starting program..." << endl << endl;
  8.   int i;
  9.   for (i=0;i<10;i++) {
  10.     cout << "Iteration " << i << endl;
  11.   }
  12.   cout << endl;
  13.   for (i=10;i>0;i--) {
  14.     cout << "Iteration " << i << endl;
  15.   }
  16.   getch();
  17.   return 0;
  18. }
  19.  
  20.